<template>
    <div class="g-son">
        <h3>子组件</h3>
        <p>显示父组件内容: {{msg}}</p>
        <p>{{info}}</p>
    </div>
</template>

<script setup>
// 1. 定义接收父组件传递给子组件参数，定义一个参数为msg
// const props = defineProps(['msg','info']) 
const props = defineProps({
    msg:String,
    info:String
})
console.log('msg ',props.msg, ' info :',props.info)

</script>

<style lang="css" scoped>
.g-son{
    width: 200px;
    height: 200px;
    background-color: pink
}
</style>